<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /Users/paulross/dev/linux/linux-3.13/include/linux/dynamic_debug.h</title>
  </head>
  <body>
    <h1>File: /Users/paulross/dev/linux/linux-3.13/include/linux/dynamic_debug.h</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="Maybe">       1:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_ref.html#_X0RZTkFNSUNfREVCVUdfSF8w"><span class="b">_DYNAMIC_DEBUG_H</span></a>
<a name="2" /><span class="Maybe">       2:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_X0RZTkFNSUNfREVCVUdfSF8w"><span class="b">_DYNAMIC_DEBUG_H</span></a>
<a name="3" /><span class="Maybe">       3:</span> 
<a name="4" /><span class="Maybe">       4:</span> <span class="k">/*</span>
<a name="5" /><span class="Maybe">       5:</span> <span class="k"> * An instance of this structure is created in a special</span>
<a name="6" /><span class="Maybe">       6:</span> <span class="k"> * ELF section at every dynamic debug callsite.  At runtime,</span>
<a name="7" /><span class="Maybe">       7:</span> <span class="k"> * the special section is treated as an array of these.</span>
<a name="8" /><span class="Maybe">       8:</span> <span class="k"> */</span>
<a name="9" /><span class="Maybe">       9:</span> <span class="m">struct</span> <span class="b">_ddebug</span> <span class="f">{</span>
<a name="10" /><span class="Maybe">      10:</span>     <span class="k">/*</span>
<a name="11" /><span class="Maybe">      11:</span> <span class="k">     * These fields are used to drive the user interface</span>
<a name="12" /><span class="Maybe">      12:</span> <span class="k">     * for selecting and displaying debug callsites.</span>
<a name="13" /><span class="Maybe">      13:</span> <span class="k">     */</span>
<a name="14" /><span class="Maybe">      14:</span>     <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">modname</span><span class="f">;</span>
<a name="15" /><span class="Maybe">      15:</span>     <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">function</span><span class="f">;</span>
<a name="16" /><span class="Maybe">      16:</span>     <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">filename</span><span class="f">;</span>
<a name="17" /><span class="Maybe">      17:</span>     <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">format</span><span class="f">;</span>
<a name="18" /><span class="Maybe">      18:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">lineno</span><span class="f">:</span><span class="c">18</span><span class="f">;</span>
<a name="19" /><span class="Maybe">      19:</span>     <span class="k">/*</span>
<a name="20" /><span class="Maybe">      20:</span> <span class="k">     * The flags field controls the behaviour at the callsite.</span>
<a name="21" /><span class="Maybe">      21:</span> <span class="k">     * The bits here are changed dynamically when the user</span>
<a name="22" /><span class="Maybe">      22:</span> <span class="k">     * writes commands to &lt;debugfs&gt;/dynamic_debug/control</span>
<a name="23" /><span class="Maybe">      23:</span> <span class="k">     */</span>
<a name="24" /><span class="Maybe">      24:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfTk9ORV8w"><span class="b">_DPRINTK_FLAGS_NONE</span></a>    <span class="c">0</span>
<a name="25" /><span class="Maybe">      25:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfUFJJTlRfMA__"><span class="b">_DPRINTK_FLAGS_PRINT</span></a>    <span class="f">(</span><span class="c">1</span><span class="f">&lt;&lt;</span><span class="c">0</span><span class="f">)</span> <span class="k">/* printk() a message using the format */</span>
<a name="26" /><span class="Maybe">      26:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfSU5DTF9NT0ROQU1FXzA_"><span class="b">_DPRINTK_FLAGS_INCL_MODNAME</span></a>    <span class="f">(</span><span class="c">1</span><span class="f">&lt;&lt;</span><span class="c">1</span><span class="f">)</span>
<a name="27" /><span class="Maybe">      27:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfSU5DTF9GVU5DTkFNRV8w"><span class="b">_DPRINTK_FLAGS_INCL_FUNCNAME</span></a>    <span class="f">(</span><span class="c">1</span><span class="f">&lt;&lt;</span><span class="c">2</span><span class="f">)</span>
<a name="28" /><span class="Maybe">      28:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfSU5DTF9MSU5FTk9fMA__"><span class="b">_DPRINTK_FLAGS_INCL_LINENO</span></a>    <span class="f">(</span><span class="c">1</span><span class="f">&lt;&lt;</span><span class="c">3</span><span class="f">)</span>
<a name="29" /><span class="Maybe">      29:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfSU5DTF9USURfMA__"><span class="b">_DPRINTK_FLAGS_INCL_TID</span></a>        <span class="f">(</span><span class="c">1</span><span class="f">&lt;&lt;</span><span class="c">4</span><span class="f">)</span>
<a name="30" /><span class="False">      30:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span> <span class="b">DEBUG</span>
<a name="31" /><span class="False">      31:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfREVGQVVMVF8w"><span class="b">_DPRINTK_FLAGS_DEFAULT</span></a> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfUFJJTlRfMA__"><span class="b">_DPRINTK_FLAGS_PRINT</span></a>
<a name="32" /><span class="Maybe">      32:</span> <span class="f">#</span><span class="n">else</span>
<a name="33" /><span class="Maybe">      33:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfREVGQVVMVF8w"><span class="b">_DPRINTK_FLAGS_DEFAULT</span></a> <span class="c">0</span>
<a name="34" /><span class="Maybe">      34:</span> <span class="f">#</span><span class="n">endif</span>
<a name="35" /><span class="Maybe">      35:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">flags</span><span class="f">:</span><span class="c">8</span><span class="f">;</span>
<a name="36" /><span class="Maybe">      36:</span> <span class="f">}</span> <span class="b">__attribute__</span><span class="f">(</span><span class="f">(</span><span class="b">aligned</span><span class="f">(</span><span class="c">8</span><span class="f">)</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="37" /><span class="Maybe">      37:</span> 
<a name="38" /><span class="Maybe">      38:</span> 
<a name="39" /><span class="Maybe">      39:</span> <span class="m">int</span> <span class="b">ddebug_add_module</span><span class="f">(</span><span class="m">struct</span> <span class="b">_ddebug</span> <span class="f">*</span><span class="b">tab</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">n</span><span class="f">,</span>
<a name="40" /><span class="Maybe">      40:</span>                 <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">modname</span><span class="f">)</span><span class="f">;</span>
<a name="41" /><span class="Maybe">      41:</span> 
<a name="42" /><span class="False">      42:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">CONFIG_DYNAMIC_DEBUG</span><span class="f">)</span>
<a name="43" /><span class="False">      43:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">ddebug_remove_module</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">mod_name</span><span class="f">)</span><span class="f">;</span>
<a name="44" /><span class="False">      44:</span> <span class="m">extern</span> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">2</span><span class="f">,</span> <span class="c">3</span><span class="f">)</span>
<a name="45" /><span class="False">      45:</span> <span class="m">int</span> <span class="b">__dynamic_pr_debug</span><span class="f">(</span><span class="m">struct</span> <span class="b">_ddebug</span> <span class="f">*</span><span class="b">descriptor</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span><span class="f">;</span>
<a name="46" /><span class="False">      46:</span> 
<a name="47" /><span class="False">      47:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">ddebug_dyndbg_module_param_cb</span><span class="f">(</span><span class="m">char</span> <span class="f">*</span><span class="b">param</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="b">val</span><span class="f">,</span>
<a name="48" /><span class="False">      48:</span>                     <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">modname</span><span class="f">)</span><span class="f">;</span>
<a name="49" /><span class="False">      49:</span> 
<a name="50" /><span class="False">      50:</span> <span class="m">struct</span> <span class="b">device</span><span class="f">;</span>
<a name="51" /><span class="False">      51:</span> 
<a name="52" /><span class="False">      52:</span> <span class="m">extern</span> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">3</span><span class="f">,</span> <span class="c">4</span><span class="f">)</span>
<a name="53" /><span class="False">      53:</span> <span class="m">int</span> <span class="b">__dynamic_dev_dbg</span><span class="f">(</span><span class="m">struct</span> <span class="b">_ddebug</span> <span class="f">*</span><span class="b">descriptor</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">device</span> <span class="f">*</span><span class="b">dev</span><span class="f">,</span>
<a name="54" /><span class="False">      54:</span>               <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span><span class="f">;</span>
<a name="55" /><span class="False">      55:</span> 
<a name="56" /><span class="False">      56:</span> <span class="m">struct</span> <span class="b">net_device</span><span class="f">;</span>
<a name="57" /><span class="False">      57:</span> 
<a name="58" /><span class="False">      58:</span> <span class="m">extern</span> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">3</span><span class="f">,</span> <span class="c">4</span><span class="f">)</span>
<a name="59" /><span class="False">      59:</span> <span class="m">int</span> <span class="b">__dynamic_netdev_dbg</span><span class="f">(</span><span class="m">struct</span> <span class="b">_ddebug</span> <span class="f">*</span><span class="b">descriptor</span><span class="f">,</span>
<a name="60" /><span class="False">      60:</span>              <span class="m">const</span> <span class="m">struct</span> <span class="b">net_device</span> <span class="f">*</span><span class="b">dev</span><span class="f">,</span>
<a name="61" /><span class="False">      61:</span>              <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span><span class="f">;</span>
<a name="62" /><span class="False">      62:</span> 
<a name="63" /><span class="False">      63:</span> <span class="f">#</span><span class="n">define</span> <span class="b">DEFINE_DYNAMIC_DEBUG_METADATA</span><span class="f">(</span><span class="b">name</span><span class="f">,</span> <span class="b">fmt</span><span class="f">)</span>        \
<a name="64" /><span class="False">      64:</span>     <span class="m">static</span> <span class="m">struct</span> <span class="b">_ddebug</span>  <a href="cpu.c_macros_ref.html#_X19hbGlnbmVkXzA_"><span class="b">__aligned</span></a><span class="f">(</span><span class="c">8</span><span class="f">)</span>            \
<a name="65" /><span class="False">      65:</span>     <span class="b">__attribute__</span><span class="f">(</span><span class="f">(</span><span class="b">section</span><span class="f">(</span><span class="e">&quot;__verbose&quot;</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="b">name</span> <span class="f">=</span> <span class="f">{</span>        \
<a name="66" /><span class="False">      66:</span>         <span class="f">.</span><span class="b">modname</span> <span class="f">=</span> <span class="b">KBUILD_MODNAME</span><span class="f">,</span>            \
<a name="67" /><span class="False">      67:</span>         <span class="f">.</span><span class="b">function</span> <span class="f">=</span> <span class="b">__func__</span><span class="f">,</span>                \
<a name="68" /><span class="False">      68:</span>         <span class="f">.</span><span class="b">filename</span> <span class="f">=</span> <span class="b">__FILE__</span><span class="f">,</span>                \
<a name="69" /><span class="False">      69:</span>         <span class="f">.</span><span class="b">format</span> <span class="f">=</span> <span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span>                \
<a name="70" /><span class="False">      70:</span>         <span class="f">.</span><span class="b">lineno</span> <span class="f">=</span> <span class="b">__LINE__</span><span class="f">,</span>                \
<a name="71" /><span class="False">      71:</span>         <span class="f">.</span><span class="b">flags</span> <span class="f">=</span>  <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfREVGQVVMVF8w"><span class="b">_DPRINTK_FLAGS_DEFAULT</span></a><span class="f">,</span>        \
<a name="72" /><span class="False">      72:</span>     <span class="f">}</span>
<a name="73" /><span class="False">      73:</span> 
<a name="74" /><span class="False">      74:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_ZHluYW1pY19wcl9kZWJ1Z18w"><span class="b">dynamic_pr_debug</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                \
<a name="75" /><span class="False">      75:</span> <span class="m">do</span> <span class="f">{</span>                                \
<a name="76" /><span class="False">      76:</span>     <span class="b">DEFINE_DYNAMIC_DEBUG_METADATA</span><span class="f">(</span><span class="b">descriptor</span><span class="f">,</span> <span class="b">fmt</span><span class="f">)</span><span class="f">;</span>        \
<a name="77" /><span class="False">      77:</span>     <span class="m">if</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><span class="b">descriptor</span><span class="f">.</span><span class="b">flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfUFJJTlRfMA__"><span class="b">_DPRINTK_FLAGS_PRINT</span></a><span class="f">)</span><span class="f">)</span>    \
<a name="78" /><span class="False">      78:</span>         <span class="b">__dynamic_pr_debug</span><span class="f">(</span><span class="f">&amp;</span><span class="b">descriptor</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span>    \
<a name="79" /><span class="False">      79:</span>                    <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span><span class="f">;</span>        \
<a name="80" /><span class="False">      80:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="81" /><span class="False">      81:</span> 
<a name="82" /><span class="False">      82:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_ZHluYW1pY19kZXZfZGJnXzA_"><span class="b">dynamic_dev_dbg</span></a><span class="f">(</span><span class="b">dev</span><span class="f">,</span> <span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                \
<a name="83" /><span class="False">      83:</span> <span class="m">do</span> <span class="f">{</span>                                \
<a name="84" /><span class="False">      84:</span>     <span class="b">DEFINE_DYNAMIC_DEBUG_METADATA</span><span class="f">(</span><span class="b">descriptor</span><span class="f">,</span> <span class="b">fmt</span><span class="f">)</span><span class="f">;</span>        \
<a name="85" /><span class="False">      85:</span>     <span class="m">if</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><span class="b">descriptor</span><span class="f">.</span><span class="b">flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfUFJJTlRfMA__"><span class="b">_DPRINTK_FLAGS_PRINT</span></a><span class="f">)</span><span class="f">)</span>    \
<a name="86" /><span class="False">      86:</span>         <span class="b">__dynamic_dev_dbg</span><span class="f">(</span><span class="f">&amp;</span><span class="b">descriptor</span><span class="f">,</span> <span class="b">dev</span><span class="f">,</span> <span class="b">fmt</span><span class="f">,</span>    \
<a name="87" /><span class="False">      87:</span>                   <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span><span class="f">;</span>        \
<a name="88" /><span class="False">      88:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="89" /><span class="False">      89:</span> 
<a name="90" /><span class="False">      90:</span> <span class="f">#</span><span class="n">define</span> <span class="b">dynamic_netdev_dbg</span><span class="f">(</span><span class="b">dev</span><span class="f">,</span> <span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>            \
<a name="91" /><span class="False">      91:</span> <span class="m">do</span> <span class="f">{</span>                                \
<a name="92" /><span class="False">      92:</span>     <span class="b">DEFINE_DYNAMIC_DEBUG_METADATA</span><span class="f">(</span><span class="b">descriptor</span><span class="f">,</span> <span class="b">fmt</span><span class="f">)</span><span class="f">;</span>        \
<a name="93" /><span class="False">      93:</span>     <span class="m">if</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><span class="b">descriptor</span><span class="f">.</span><span class="b">flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfUFJJTlRfMA__"><span class="b">_DPRINTK_FLAGS_PRINT</span></a><span class="f">)</span><span class="f">)</span>    \
<a name="94" /><span class="False">      94:</span>         <span class="b">__dynamic_netdev_dbg</span><span class="f">(</span><span class="f">&amp;</span><span class="b">descriptor</span><span class="f">,</span> <span class="b">dev</span><span class="f">,</span> <span class="b">fmt</span><span class="f">,</span>    \
<a name="95" /><span class="False">      95:</span>                      <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span><span class="f">;</span>        \
<a name="96" /><span class="False">      96:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="97" /><span class="False">      97:</span> 
<a name="98" /><span class="False">      98:</span> <span class="f">#</span><span class="n">define</span> <span class="b">dynamic_hex_dump</span><span class="f">(</span><span class="b">prefix_str</span><span class="f">,</span> <span class="b">prefix_type</span><span class="f">,</span> <span class="b">rowsize</span><span class="f">,</span>    \
<a name="99" /><span class="False">      99:</span>              <span class="b">groupsize</span><span class="f">,</span> <span class="b">buf</span><span class="f">,</span> <span class="b">len</span><span class="f">,</span> <span class="b">ascii</span><span class="f">)</span>        \
<a name="100" /><span class="False">     100:</span> <span class="m">do</span> <span class="f">{</span>                                \
<a name="101" /><span class="False">     101:</span>     <span class="b">DEFINE_DYNAMIC_DEBUG_METADATA</span><span class="f">(</span><span class="b">descriptor</span><span class="f">,</span>        \
<a name="102" /><span class="False">     102:</span>         <span class="b">__builtin_constant_p</span><span class="f">(</span><span class="b">prefix_str</span><span class="f">)</span> <span class="f">?</span> <span class="b">prefix_str</span> <span class="f">:</span> <span class="e">&quot;hexdump&quot;</span><span class="f">)</span><span class="f">;\
</span>    <span class="m">if</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><span class="b">descriptor</span><span class="f">.</span><span class="b">flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfUFJJTlRfMA__"><span class="b">_DPRINTK_FLAGS_PRINT</span></a><span class="f">)</span><span class="f">)</span>    \
<a name="104" /><span class="False">     104:</span>         <span class="b">print_hex_dump</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a><span class="f">,</span> <span class="b">prefix_str</span><span class="f">,</span>        \
<a name="105" /><span class="False">     105:</span>                    <span class="b">prefix_type</span><span class="f">,</span> <span class="b">rowsize</span><span class="f">,</span> <span class="b">groupsize</span><span class="f">,</span>    \
<a name="106" /><span class="False">     106:</span>                    <span class="b">buf</span><span class="f">,</span> <span class="b">len</span><span class="f">,</span> <span class="b">ascii</span><span class="f">)</span><span class="f">;</span>        \
<a name="107" /><span class="False">     107:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="108" /><span class="False">     108:</span> 
<a name="109" /><span class="Maybe">     109:</span> <span class="f">#</span><span class="n">else</span>
<a name="110" /><span class="Maybe">     110:</span> 
<a name="111" /><span class="Maybe">     111:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">string</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="112" /><span class="Maybe">     112:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">errno</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="113" /><span class="Maybe">     113:</span> 
<a name="114" /><span class="Maybe">     114:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">ddebug_remove_module</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">mod</span><span class="f">)</span>
<a name="115" /><span class="Maybe">     115:</span> <span class="f">{</span>
<a name="116" /><span class="Maybe">     116:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="117" /><span class="Maybe">     117:</span> <span class="f">}</span>
<a name="118" /><span class="Maybe">     118:</span> 
<a name="119" /><span class="Maybe">     119:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">ddebug_dyndbg_module_param_cb</span><span class="f">(</span><span class="m">char</span> <span class="f">*</span><span class="b">param</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="b">val</span><span class="f">,</span>
<a name="120" /><span class="Maybe">     120:</span>                         <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">modname</span><span class="f">)</span>
<a name="121" /><span class="Maybe">     121:</span> <span class="f">{</span>
<a name="122" /><span class="Maybe">     122:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">strstr</span><span class="f">(</span><span class="b">param</span><span class="f">,</span> <span class="e">&quot;dyndbg&quot;</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="123" /><span class="Maybe">     123:</span>         <span class="k">/* avoid pr_warn(), which wants pr_fmt() fully defined */</span>
<a name="124" /><span class="Maybe">     124:</span>         <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_S0VSTl9XQVJOSU5HXzA_"><span class="b">KERN_WARNING</span></a> <span class="e">&quot;dyndbg param is supported only in &quot;</span>
<a name="125" /><span class="Maybe">     125:</span>             <span class="e">&quot;CONFIG_DYNAMIC_DEBUG builds\n&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="126" /><span class="Maybe">     126:</span>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span> <span class="k">/* allow and ignore */</span>
<a name="127" /><span class="Maybe">     127:</span>     <span class="f">}</span>
<a name="128" /><span class="Maybe">     128:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RUlOVkFMXzA_"><span class="b">EINVAL</span></a><span class="f">;</span>
<a name="129" /><span class="Maybe">     129:</span> <span class="f">}</span>
<a name="130" /><span class="Maybe">     130:</span> 
<a name="131" /><span class="Maybe">     131:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_ZHluYW1pY19wcl9kZWJ1Z18w"><span class="b">dynamic_pr_debug</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="132" /><span class="Maybe">     132:</span>     <span class="m">do</span> <span class="f">{</span> <span class="m">if</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span> <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="133" /><span class="Maybe">     133:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_ZHluYW1pY19kZXZfZGJnXzA_"><span class="b">dynamic_dev_dbg</span></a><span class="f">(</span><span class="b">dev</span><span class="f">,</span> <span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="134" /><span class="Maybe">     134:</span>     <span class="m">do</span> <span class="f">{</span> <span class="m">if</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span> <span class="b">dev_printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a><span class="f">,</span> <span class="b">dev</span><span class="f">,</span> <span class="b">fmt</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="135" /><span class="Maybe">     135:</span> <span class="f">#</span><span class="n">endif</span>
<a name="136" /><span class="Maybe">     136:</span> 
<a name="137" /><span class="True">     137:</span> <span class="f">#</span><span class="n">endif</span>
<a name="138" /><span class="True">     138:</span> </pre>
  </body>
</html>
